using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DesktopWidgetApp.Server.Models;

namespace DesktopWidgetApp.Server.Services
{
    /// <summary>
    /// 状态服务接口
    /// </summary>
    public interface IStatusService
    {
        /// <summary>
        /// 获取用户的最新状态
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>用户的最新状态</returns>
        Task<ServerStatus> GetLatestStatusByUserIdAsync(Guid userId);

        /// <summary>
        /// 添加或更新状态
        /// </summary>
        /// <param name="status">状态对象</param>
        /// <returns>添加或更新后的状态</returns>
        Task<ServerStatus> AddOrUpdateStatusAsync(ServerStatus status);

        /// <summary>
        /// 获取用户的状态历史
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="startDate">开始日期</param>
        /// <param name="endDate">结束日期</param>
        /// <returns>状态历史列表</returns>
        Task<IEnumerable<ServerStatus>> GetStatusHistoryByUserIdAsync(Guid userId, DateTime startDate, DateTime endDate);
    }
}